#include "myWindow.h"
#ifndef GL_INCLUDES
#define GL_INCLUDES
#ifdef linux
#include<GL/glew.h>
#include<GLFW/glfw3.h>
#else
#include<glew.h>
#include<glfw3.h>
#endif
#endif

#include<iostream> 

myWindow::myWindow(int height, int width, const char *name)
{
 	wndHeight = height;
    wndWidth = width;
    wndName = name;
}
int myWindow::createWindow()
{
    wnd = glfwCreateWindow(wndHeight,wndWidth, wndName , NULL, NULL);
    if(!wnd) {
         std::cout << "\nERROR : Failed to create window : " << wndName << std::endl;
         glfwTerminate();
         return 1;
    }
    return 0;
}
void myWindow::makeCurrent()
{
    glfwMakeContextCurrent(wnd);    
}

GLFWwindow * myWindow::getWindow()
{
    return wnd;
}
